﻿using System;
using System.Collections.Generic;
using System.Text;
using Obvious.Framework.Notification.Interfaces;
using Obvious.Framework.Notification.ConfigHandlers;
using System.Configuration;

namespace Obvious.Framework.Notification.Abstracts
{
    public abstract class NotificationProvider
    {
        private string _configName = null;
        protected NotificationProvider()
        {
        }
        protected NotificationProvider(string configName)
        {
            this.ConfigName = configName;
        }
        //NotificationType Type { get; }

        private ObviousNotificationSection ConfigSection
        {
            get { return NotificationConfigHandler.ConfigSection; }
        }

        protected NotificationProviderElement ConfigElement
        {
            get { return NotificationConfigHandler.GetProviderElement(this.ConfigName); }
        }

        public virtual string ConfigName
        {
            get
            {
                return _configName;
            }
            set
            {
                _configName = value;
            }
        }
        public abstract bool Notify(INotification notification);
        public abstract bool Notify(string To, string From, string Subject, string Message);
        public abstract bool Notify(string To, string From, string Subject, string Message, DateTime ScheduleSendDate);
    }
}
